﻿// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// -----------------------------------------------------------------------
using System;

namespace System.ComponentModel.Composition
{
    internal class CompositionServiceProxy : ICompositionService
    {
        private readonly CompositionContainer _container;

        public CompositionServiceProxy(CompositionContainer container)
        {
            this._container = container;
        }

        public bool IsCompositionPending
        {
            get { return this._container.IsCompositionPending; }
        }

        public bool IsComposing
        {
            get { return this._container.IsComposing; }
        }

        public void AddPart(ComposablePart part)
        {
            this._container.AddPart(part);
        }

        public void Compose()
        {
            this._container.Compose();
        }

        public void RemovePart(ComposablePart part)
        {
            this._container.RemovePart(part);
        }

        public CompositionResult SatisfyImports(ComposablePart composablePart)
        {
            return this._container.SatisfyImports(composablePart);
        }
    }
}
